package com.leetroll.api.mapper;

import com.leetroll.common.entity.Issue;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface IssueMapper extends SuperMapper<Issue> {

    @Select("select b.name as user_name, b.avatar as user_avatar,a.* from (\n" +
            "\tSELECT * FROM public.issue where subject=#{subject} \n" +
            ") as a left join public.user b\n" +
            "on a.user_id = b.id order by a.id")
    List<Issue> list(@Param("subject") String subject, @Param("keyword") String keyword);

}
